<?php 
include('../Connections/KRAPPERCON.php');
include('../Connections/Accesos.php');
?>
<div>
<input type="button" value="Buscar" onClick="listarArt()">
<input name="rblis" type="radio" id="rb_lis1" value="rb_mt1" checked="checked" />
&nbsp;Codigos &nbsp;&nbsp;
<!-- <input type="radio" id="rb_lis2" name="rblis" value="rb_mt1" /> 
&nbsp;Todos&nbsp;&nbsp; --> </div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>Codigo</td>
    <td>
      <input name="t_cod_lar" type="text" id="t_cod_lar" maxlength="20">
    </td>
    <td colspan="2">
      <input type="checkbox" name="chk_stk" id="chk_stk">&nbsp;Solamente Articulos con Stock    </td>
  </tr>
  <tr>
    <td>Marca</td>
    <td>
      <select name="cbo_mar_lar" id="cbo_mar_lar">
      <option value=""></option>
      	<?php include('../Query_Min/getMarcas.php'); ?>
      </select>
    </td>
    <td>Familia</td>
    <td>
      <select name="cbo_fam_lar" id="cbo_fam_lar">
            <option value=""></option>
            <?php include ('../Query_Min/getFamilias.php');
	  ?>
      </select>
    </td>
  </tr>
  <tr>
    <td>Clase</td>
    <td>
      <select name="cbo_cla_lar" id="cbo_cla_lar">
            <option value=""></option>
<?php 
include ('../Query_Min/getClasesArt.php');
?>
      </select>
    </td>
    <td>Ubicacion</td>
    <td>
      <input type="text" name="t_ubi_lar" id="t_ubi_lar">
    </td>
  </tr>
  <tr>
    <td>Almacen</td>
    <td>
      <select name="cbo_alm_lar" id="cbo_alm_lar">
            <option value=""></option>
      <?php 
	  $combo = '';
	  include ('../Query_Min/getAlmacenes.php');
	  echo $combo;
	  ?>
      </select>
    </td>
    <td>Local</td>
    <td>
      <select name="cbo_loc_lar" id="cbo_loc_lar">
            <option value=""></option>
      <?php 
	  $combo_ctr = '';
	  include ('../Query_Min/getCentros.php');
	  //echo $combo_ctr;
	  ?>
      </select>
    </td>
  </tr>
  <tr>
    <td colspan="4">&nbsp;</td>
</tr>
    <tr>
    <td colspan="4"><div id="d_res_art"></div></td>
  </tr>
</table>
<script type="text/javascript">
function listarArt(){
	var opc = 0;
	if (GEBI('rb_lis1').checked){
	opc = 1;
	}
	if (GEBI('rb_lis2').checked){
	opc = 2;
	} 

	$("#d_res_art").loadx('Consultas/Opers/queryLstArt.php',{
		opcion : opc,
		code : GEBI('t_cod_lar').value,
		name : GEBI('t_nom_lar').value,
		marca : GEBI('cbo_mar_lar').value,
		clase : GEBI('cbo_cla_lar').value,
		family : GEBI('cbo_fam_lar').value,
		ubic : GEBI('t_ubi_lar').value,
		centro : GEBI('cbo_loc_lar').value,
		almac : GEBI('cbo_alm_lar').value,
		stock : (GEBI('chk_stk').checked?1:0)
	});
}

function clicksCod(obj){
loadPage('Mantenimientos/MantArt.php',{ oper : 'view' , codart : $(obj).html() , tip: 'ac' });	

}
</script>
